<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0050)http://localhost:8080/HouseRent/manage!list.action -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>后台数据展示修改删除</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<LINK rel=stylesheet type=text/css href="../css/style.css">
<META name=GENERATOR>
</HEAD>
<BODY onload="test()">
	<DIV id=header class=wrap>
		<DIV id=logo>
			<IMG src="../images/logo.gif">
		</DIV>
		<DIV class=search>
			<LABEL class="ui-green searchs"> 
				<a href="fabu.jsp" title="">发布房屋信息</a>
			</LABEL> 
			<LABEL class="ui-green searchs"> 
				<a href="list.jsp" title="">退出</a>
			</LABEL>
		</DIV>
	</DIV>
	<DIV class="main wrap">
		<DIV id=houseArea>
			<TABLE class=house-list id="showTable">
				<TBODY>
					
				</TBODY>
			</TABLE>
		</DIV>

		<DIV class=pager>
			<UL>
				<LI class=current><A id=widget_338868862
					href="http://localhost:8080/HouseRent/manage!ajaxList.action?number=1"
					parseContent="true" showError="true" targets="houseArea"
					ajaxAfterValidation="false" validate="false"
					dojoType="struts:BindAnchor">1 </A></LI>
				<LI class=current><A id=widget_1160989910
					href="http://localhost:8080/HouseRent/manage!ajaxList.action?number=2"
					parseContent="true" showError="true" targets="houseArea"
					ajaxAfterValidation="false" validate="false"
					dojoType="struts:BindAnchor">2 </A></LI>
			</UL>
			<SPAN class=total>1/2页</SPAN>
		</DIV>
	</DIV>
	<DIV id=footer class=wrap>
		<DL>
			<DT>云和租房 © 2010 云和 京ICP证1000001号</DT>
			<DD>关于我们 · 联系方式 · 意见反馈 · 帮助中心</DD>
		</DL>
	</DIV>
</BODY>
<script type="text/javascript" src="/scripts/jquery.js"></script>
<script>
	function test() {
		var url = "seeHouse.action";
		$(function() {
			$.ajax({
				url : url,
				type : 'post', //数据发送方式 
				dataType : 'json', //接受数据格式 (这里有很多,常用的有html,xml,js,json) 
				error : function() { //失败 
					alert('Error loading document');
				},
				success : function(data) { //成功 
					$.each(data.list, function(i, item) {
						//定义一个变量用来接收遍历的结果集
						var _tr = $("<tr>" + 
										"<td>"+ 
											"<span>"+
												"<a>"+"<img src='../images/thumb_house.gif' width='100' height='75' alt=''>"+"</a>"+
											"</span>"+ 
										"</td>" +
		
										"<td>" + 
											"<dl>" +
												"<dt>"+
													"<a href='selectByTitle.action?title="+item.title+"' target='_blank'>"+
														item.title+
													"</a>"+
												"</dt>"+
												"<dd>"+
													item.street_id.district_id.name+
													item.type_id.name+
													","+
													item.floorage+"平米"+
													"<br>"+
													"联系方式："+
													item.contact+
												"</dd>"+
											"</dl>"+
										"</td>"+ 
										
										
										"<td class=house-type>" + 
											"<label class='ui-green searchs'>"+
													"<a href='xg.action?id="+item.id+"'>"+
													"修改"+
													"</a>"+
											"</label>"+
										"</td>" +
										
										"<td class=house-price>" + 
											"<label class='ui-green searchs'>"+
													"<a href='delHouse.action?id="+item.id+"'>"+
													"删除"+
													"</a>"+
											"</label>"+
										"</td>" +  
									"</tr>");
						//append() 方法在被选元素的结尾（仍然在内部）插入指定内容。
						$("#showTable").append(_tr);
					});
				}
			});
		})
	}
</script>
</HTML>
